}
},
+ removeSourceByApp: function(app) {
+ for (let source in this._sources)
+ if (this._sources[source].app == app)
+ this.removeSource(this._sources[source]);
+ },
+
removeNotification: function(notification) {
if (this._notification == notification && (this._notificationState == State.SHOWN || this._notificationState == State.SHOWING)) {
if (this._notificationTimeoutId) {
Lang.bind(this, this._lostName));
this._currentNotifications = {};
+
+ Shell.WindowTracker.get_default().connect('notify::focus-app',
+ Lang.bind(this, this._onFocusAppChanged));
},
_acquiredName: function() {
];
},
+ _onFocusAppChanged: function(tracker) {
+ Main.messageTray.removeSourceByApp(tracker.focus_app);
+ },
+
_actionInvoked: function(notification, action, source, id) {
this._emitActionInvoked(id, action);
source.destroy();